import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/home/Home'
import XingZuo from '@/components/xingzuo/xingzuo'
import Pages from '@/components/pages/pages'
import ShuangYu from '@/components/pages/shuangyu'
import BaiYang from '@/components/pages/baiyang'
import Common from '@/components/common/common'
import MallPAge from '@/components/common/mallpage'
Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Home',
      component: Home
    },
    {
        path: '/common',
        name: 'Common',
        component: Common
      },
    {
      path: '/xingzuo',
      name: 'XingZuo',
      component: XingZuo,
      children: [
         {
          path:'/',
          redirect:'/xingzuo/baiyang'
        },
        {
          path: 'pages',
          name: 'Pages',
          component: Pages
        },
           {
          path: 'shuangyu',
          name: 'ShuangYu',
          component: ShuangYu
        },{
          path: 'baiyang',
          name: 'BaiYang',
          component: BaiYang
        }
      ]
    },
      {
    path: '/common/mallpage/:id',
    name: 'MallPAge',
    component: MallPAge}

  ]
})
